#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QGraphicsView>//视图
#include <QGraphicsScene>// 场景
#include <QGraphicsTextItem>
#include <QGraphicsRectItem>
#pragma once
#include<QToolButton>
#include<QGraphicsPixmapItem>//图形元素
#include "mstartscene.h"
#include "deck.h"
#include"failscene.h"
#include"winscene.h"
#include"midwinscene.h"
#include"instructionsscene.h"
#include"sound.h"
#include"gamelevelscene.h"
//图形元素组成场景，场景组成视图，视图组成窗口

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:
    Ui::Widget *ui;
    QGraphicsView mGameView;//游戏视图
    mStartScene m_StartScene;
    FailScene m_failScene;
    WinScene m_winScene;
    MidWinScene m_midWinScene;
    GameLevelScene m_gameLevelScene;
    InstructionsScene m_InstructionsScene;
    Sound *mSound1;
    Deck mDeck;
    int InNum=0;//最多出5次
    int OutNum=0;//最多出4次
    int WinScore[3]={250,350,450};//250,350,450
    int n=0;//游戏局数
};
#endif // WIDGET_H
